<?php


/**
 * 
 * 
 */
class Of_Propel_Rs
{
  
  
	/**
	 * 
	 */
	const CLASS_NAME = "Of_Propel_Rs";
	
	public function get($column)
	{
		return $this->$column;
	}
	
	public function getDate($column, $format="%Y-%m-%d")
	{
		$ts = strtotime($this->$column);
		if(!strpos($format,"%"))
		{
			return date($format, $ts);
		}
		
		return strftime($format, $ts);
	}
	
	public function getRow()
	{
		return get_object_vars($this);
	}
	
	public function __call($method, $args)
	{
		$name = preg_replace("/^get/", "", $method);
		if(strpos($name,"_") !== false)
		{
			return $this->parseObject($name);
		}else{
			
			$name = strtoupper(sfInflector::underscore($name));
			
			if(isset($this->$name))
			{
				return $this->$name;
			}
			
		}
		
		
		return null;
	}
	
	public function parseObject($name)
	{
		
	}
  
}